<?php	require_once(dirname(__FILE__).'/inc/config.inc.php'); 

$dosql->Execute("SELECT `id` FROM `#@__order` WHERE `jindu`=1  and is_delete=0  ",1);
$count1=$dosql->GetTotalRow(1); //已经派单

$dosql->Execute("SELECT `id` FROM `#@__order` WHERE `jindu`=2   and is_delete=0   ",2);
$count2=$dosql->GetTotalRow(2); //维修中

$dosql->Execute("SELECT `id` FROM `#@__order` WHERE `jindu`=3  and is_delete=0  ",3);
$count3=$dosql->GetTotalRow(3); //报修完成

$dosql->Execute("SELECT `id` FROM `#@__order` WHERE `jindu`=4  and is_delete=0   ",4);
$count4=$dosql->GetTotalRow(4); //报修完成

$dosql->Execute("SELECT `id` FROM `#@__order` WHERE `jindu`=5  and is_delete=0   ",5);
$count5=$dosql->GetTotalRow(5); //报修完成


$dosql->Execute("SELECT `id` FROM `#@__order` WHERE 1  and is_delete=0   ",6);
$count_all=$dosql->GetTotalRow(6); //报修完成

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>后台首页</title>
<link href="templates/style/admin.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="templates/js/jquery.min.js"></script>
<script type="text/javascript" src="templates/js/layer/layer.js"></script>
<!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
<link rel="stylesheet" href="ui/css/bootstrap.min.css">
<link rel="stylesheet" href="ui/css/bootstrap-theme.min.css" >
<script src="ui/js/bootstrap.min.js" ></script>
</head>
<body>
<div class="place"> <span>位置：</span>
  <ul class="placeul">
    <li><a href="#">首页</a></li>
    <li><a href="#">工作台</a></li>
  </ul>
</div>
<div class="formbody">
  <div class="alert alert-success liucheng" role="alert"> 系统中工单的处理流程： <br />
    1、用户报修 <i class="glyphicon glyphicon-chevron-right"></i> 2、客服联系客户确认 <i class="glyphicon glyphicon-chevron-right"></i> 3、系统派单 <i class="glyphicon glyphicon-chevron-right"></i> 4、工程师接单 <i class="glyphicon glyphicon-chevron-right"></i> 5、工程师完修并申报 <i class="glyphicon glyphicon-chevron-right"></i> 6、用户评价 <i class="glyphicon glyphicon-chevron-right"></i> 7、系统自动结单 归档 </div>
  <div class="formtitle"><span>进行中的工单管理</span></div>
  <div class="toolsli">
    <ul class="toollist">
      <li><a href="order.php?jindu=1"><img src="templates/images/add-user.png" width="45" /><span class="badge badge-important"><?php echo $count1?></span></a>
        <h2>待确认</h2>
      </li>
      <li><a href="order.php"><img src="templates/images/database-refresh.png" width="45"/><span class="badge badge-important"><?php echo $count2?></span></a>
        <h2>已确认</h2>
      </li>
      <li><a href="order.php"><img src="templates/images/download.png"  width="45"/><span class="badge badge-important"><?php echo $count3?></span></a>
        <h2>已派单</h2>
      </li>
      <li><a href="order.php"><img src="templates/images/add-to-basket.png" width="45" /><span class="badge badge-important"><?php echo $count4?></span></a>
        <h2>已接单</h2>
      </li>
      <li><a href="order.php"><img src="templates/images/tasks.png" width="45"/><span class="badge badge-important"><?php echo $count5?></span></a>
        <h2>已经完修</h2>
      </li>
    </ul>
  </div>
  <div class="formtitle"><span>工单统计</span></div>
  <div class="toolsli">
    <ul class="toollist">
      <li><a href="order.php"><img src="templates/images/icon06.png"  width="45"/><span class="label label-success">共
        <?php
					echo $count_all;
		?>
        个</span></a>
        <h2>工单数</h2>
      </li>
      <li><a href="order.php"><img src="templates/images/icon03.png" width="45" /><span class="label label-success">共
        <?php
						$dosql->Execute("SELECT `id` FROM `#@__order` WHERE is_delete=0 AND `jindu`=6");
						echo $dosql->GetTotalRow();
		?>
        个</span></a>
        <h2>已经评价</h2>
      </li>
      <li><a href="order.php"><img src="templates/images/icon07.png" width="45" /><span class="label label-success">共
        <?php
						$dosql->Execute("SELECT `id` FROM `#@__order` WHERE is_delete=0 AND `jindu`>4");
						echo $dosql->GetTotalRow();
		?>
        个</span></a>
        <h2>完结工单</h2>
      </li>
      <li><a href="cascade.php"><img src="templates/images/run.png" width="45"/></a>
        <h2>工单参数</h2>
      </li>
      <li><a href="crm.php"><img src="templates/images/woshou.png" width="45"/></a>
        <h2>CRM</h2>
      </li>
    </ul>
  </div>
</div>
</body>
</html>